
<template>
  <div>
    <wx-open-launch-app id="openApp" appid="wx0100408fef909619" extinfo="">
      <template> </template>
    </wx-open-launch-app>
    <img class="img" src="../assets/跳转页.png" />
    <van-button class="button" round type="primary" @click="get()"
      >前往App</van-button
    >
  </div>
</template>
<script>
import { getWxShare } from "../request/wxShare";
export default {
  data() {
    return { modeltype: "" };
  },
  methods: {
    get() {
      var btn = document.getElementById('openApp');
      btn.addEventListener('launch', () => {
        console.log('success');
      });
      btn.addEventListener('error', (e) => {
        console.log('fail', e.detail);
      });
    },
  },
  created() {
    
    getWxShare(window.location.href);
  },
};
</script>
<style scoped>
.img {
  position: absolute;
  z-index: -1;
  width: 7.5rem;
  height: 16.24rem;
}
.button {
  position: relative;
  text-align: center;
  margin-top: 10rem;
  margin-left: 3rem;
}
</style>